﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SmartMD.DataModel;

namespace SmartMD.Manager.Specimens
{
    public class SpecQueryResult : BusinessEntity
    {
    //    private string _id;
        private string _specCode;
        private string _patientName;
        private string _subject;
        private string _siteCode;
        private string _followerUper;
        private int _followUpTimes;
        private DateTime _followUpDate;
        private string _specType;
        private string _entityState;
        private int _freezeThrawTimes;
        private int _wholeCapacity;

        public override void setValue(string key, Object value)
        {
            if (value is System.DBNull)
                return;
            switch (key.ToLower())
            {
                case "id":
                    this.Id = (string)value;
                    this.SpecCode = (string)value;
                    break;
                case "patientname":
                    this.PatientName = (string)value;
                    break;
                case "subject":
                    this.Subject = (string)value;
                    break;
                case "sitecode":
                    this.SiteCode = (string)value;
                    break;
                case "collecter":
                    this.FollowerUper = (string)value;
                    break;
                case "storeddate":
                    this.FollowUpDate = (DateTime)value;
                    break;
                case "followuptimes":
                    this.FollowUpTimes = int.Parse(value.ToString());
                    break;
                case "spectype":
                    this.SpecType = (string)value;
                    break;
                case "entitystate":
                    this.EntityState = (string)value;
                    break;
                case "freezethrawtimes":
                    this.FreezeThrawTimes = int.Parse(value.ToString());
                    break;
                default:
                    break;
            }
        }
        public int WholeCapacity
        {
            get
            {
                return _wholeCapacity;
            }
            set
            {
                _wholeCapacity = value;
                OnPropertyChanged(() => WholeCapacity);
            }
        }

        public int FreezeThrawTimes
        {
            get
            {
                return _freezeThrawTimes;
            }
            set
            {
                _freezeThrawTimes = value;
                OnPropertyChanged(() => FreezeThrawTimes);
            }
        }

        public String EntityState
        {
            get
            {
                return _entityState;
            }
            set
            {
                _entityState = value;
                OnPropertyChanged(() => EntityState);
            }
        }

        public String SpecCode
        {
            get
            {
                return _specCode;
            }
            set
            {
                _specCode = value;
                OnPropertyChanged(() => SpecCode);
            }
        }
        public String PatientName
        {
            get
            {
                return _patientName;
            }
            set
            {
                _patientName = value;
                OnPropertyChanged(() => PatientName);
            }
        }
        public String Subject
        {
            get
            {
                return _subject;
            }
            set
            {
                _subject = value;
                OnPropertyChanged(() => Subject);
            }
        }
        public String SiteCode
        {
            get
            {
                return _siteCode;
            }
            set
            {
                _siteCode = value;
                OnPropertyChanged(() => SiteCode);
            }
        }
        public String FollowerUper
        {
            get
            {
                return _followerUper;
            }
            set
            {
                _followerUper = value;
                OnPropertyChanged(() => FollowerUper);
            }
        }
        public int FollowUpTimes
        {
            get
            {
                return _followUpTimes;
            }
            set
            {
                _followUpTimes = value;
                OnPropertyChanged(() => FollowUpTimes);
            }
        }
        public DateTime FollowUpDate
        {
            get
            {
                return _followUpDate;
            }
            set
            {
                _followUpDate = value;
                OnPropertyChanged(() => FollowUpDate);
            }
        }
        public string SpecType
        {
            get
            {
                return _specType;
            }
            set
            {
                _specType = value;
                OnPropertyChanged(() => SpecType);
            }
        }

       
    }
}
